SharedRoomConventionPlugin

class SharedRoomConventionPlugin : Plugin<Project>

Convention plugin configuring Room 3 (KMP) for a module already using SharedKmpLibraryConventionPlugin.

Applies the androidx.room3 + com.google.devtools.ksp Gradle plugins, points the schema export directory at <module>/schemas, and wires androidx-room-runtime (commonMain) + androidx-room-compiler (via KSP) for the three targets shared.kmp.library declares — Android, iosArm64, iosSimulatorArm64. Both library aliases are looked up from the consuming project's own version catalog (same pattern as SharedTestConventionPlugin) and silently skipped if absent, so this repo's own catalog only needs the two Gradle-plugin coordinates used to compile/apply this plugin.

Apply with id("shared.room") after id("shared.kmp.library") (or shared.kmp.compose) on any module with a Room database — the KSP per-target configurations (kspAndroid, kspIosArm64, kspIosSimulatorArm64) only exist once the Kotlin Multiplatform targets are already declared.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun apply(target: Project)